/// <reference path="../../wx/device/WxDevice.ts" />

namespace mplat{
    export class MzDevice extends WxDevice{

        setClipboardData(data: any, success?: (res) => void): void {
            if (!window['mz']['setClipboardData']) return;
            window['mz'].setClipboardData({
                data,
                success
            })
        }
        getClipboardData(success: (res: any) => void): void {
            if (!window['mz']['getClipboardData']) return;
            window['mz']['getClipboardData']({
                success
            })
        }

        vibrateLong(): void {
            if (!this._isVibrateOn) return;
            if (window['mz']['vibrateLong']) {
                window['mz']['vibrateLong']();
            }
        }
        vibrateShort(): void {
            if (!this._isVibrateOn) return;
            if (window['mz']['vibrateShort']) {
                window['mz']['vibrateShort']();
            }
        }
    }
}